<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<style>
[style] + span { color: green; } 
</style>
<div id="styledDiv"></div>
<span id="target"></span>
<script>
  test(function() {
    document.body.offsetTop;
    styledDiv.style.color = "red";
    assert_equals(internals.updateStyleAndReturnAffectedElementCount(), 2);
    assert_equals(getComputedStyle(target).color, "rgb(0, 128, 0)");
  }, "Test that we schedule invalidation sets for changes made to style attributes.");
</script>